#include <iostream>
#include <iomanip>
using namespace std;

class Book
{
    string name;
    string code;
    double cost;
public:
    Book(string s,string c,double co):name(s),code(c),cost(co){}
    friend ostream& operator <<(ostream &out,Book b);
};


ostream& operator <<(ostream &out,Book b)
{
	//out<<resetiosflags(ios::showbase);
    out<<setw(15)<<b.name<<setw(15)<<b.code<<setw(15)<<b.cost<<endl;
    return out;
}

ostream & leftform(ostream & out)
{
    cout<<"left :";
    out.setf(ios::left,ios::adjustfield);
    out.precision(2);
    //out.setf(ios::showpos);
    out.setf(ios::showpoint);
    out<<setiosflags(ios::fixed);
    return out;
}

ostream & rightform(ostream & out)
{
    out<<"right:";
    out.setf(ios::right,ios::adjustfield);
    out.precision(2);
    //out.setf(ios::showpos);
    out.setf(ios::showpoint);
    out<<setiosflags(ios::fixed);
    return out;
}
